{% extends 'base.html' %}

{% block user_url %}
    /
{% endblock user_url %}

{% block user %}
    请登录
{% endblock user %}

{% block room %}
    <div class="row">
        <div class="col-md-4 col-md-offset-4" style="margin-top: 100px">
            <h1 class="text-center">请输入以下信息注册</h1>
            <form class="form-horizontal" action="/register/" method="post">
                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label"></label>
                    <div class="input-group col-sm-8">
                        <span class="input-group-addon"><i class="fa fa-user-plus fa-fw"></i>姓名</span>
                        <input type="text" name="username" class="form-control" id="inputEmail3" placeholder="username">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label"></label>
                    <div class="input-group col-sm-8">
                        <span class="input-group-addon"><i class="fa fa-envelope-o fa-fw"></i>邮箱</span>
                        <input type="email" name="email" class="form-control" id="inputEmail3" placeholder="Email">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label"></label>
                    <div class="input-group col-sm-8">
                        <span class="input-group-addon"><i class="fa fa-key fa-fw"></i>密码</span>
                        <input type="password" name="pwd" class="form-control" id="inputPassword3"
                               placeholder="Password">
                    </div>
                </div>
                <div class="form-group">
                    <div class="input-group col-sm-offset-2 col-sm-8">
                        <button type="submit" class="btn btn-primary btn-block">提交</button>
                    </div>

                    <p class="text-danger text-center">{{ error }}</p>
                </div>
                <div class="form-group">
                    <div class="input-group col-sm-offset-2 col-sm-8">
                        <a href="/" class="btn btn-primary btn-block">已有账号，返回登录</a>
                    </div>
                </div>

                {% csrf_token %}
            </form>

        </div>
    </div>
{% endblock room %}
